package com.hejing.cloud.handler;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;

/**
 * ClassName: MyRequestOrigiParser
 * Package: com.hejing.cloud.handler
 * Description:
 *
 * @Author: HeJing
 * @Create: 2024-08-07 21:01
 * @Version: 1.0
 */
@Component
public class MyRequestOriginParser implements RequestOriginParser {
    @Override
    public String parseOrigin(HttpServletRequest request) {
        return request.getParameter("serverName");
    }
}

























